<template>
  <div>
    <navs title="申请记录" />
    <van-cell-group>
      <van-cell
        title="我是专家"
        :value="expertObj.value.stateText"
        size="large"
        :label="expertObj.value.refuse_reason"
        label-class="colorRed"
      />
      <van-cell
        title="我是基地"
        :value="baseObj.value.stateText"
        size="large"
        :label="baseObj.value.refuse_reason"
        label-class="colorRed"
      />
    </van-cell-group>
  </div>
</template>

<script setup>
import { ref, reactive, getCurrentInstance, onBeforeMount } from 'vue'

const instance = getCurrentInstance()
const _this = instance.appContext.config.globalProperties
const expertObj = ref({})
const baseObj = ref({})
onBeforeMount(() => {
  _this.$api.user.getMyExpertApply().then((res) => {
    expertObj.value = res.data
    expertObj.value.stateText =
      expertObj.value.status == 1 ? '审核中' : '审核通过'
  })
  _this.$api.user.getMyBaseApply().then((res) => {
    baseObj.value = res.data
    baseObj.value.stateText = baseObj.value.status == 1 ? '审核中' : '审核通过'
  })
})
</script>

<style scoped lang="scss"></style>
